package com.example.demo.vo;

import com.diboot.core.binding.annotation.*;
import com.example.demo.entity.OrderOut;
import com.example.demo.entity.OrderSku;
import com.diboot.iam.entity.IamUser;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.util.List;
import com.example.demo.entity.Shelves;
import com.example.demo.entity.Storeroom;

/**
 * 订单出库记录 DetailVO定义
 * @author MyName
 * @version 1.0
 * @date 2024-04-02
 * Copyright © MyCompany
 */
@Getter
@Setter
@Accessors(chain = true)
public class OrderOutDetailVO extends OrderOut {

    private static final long serialVersionUID = -7261739945239822175L;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.create_by=id")
    private String createByName;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.update_by=id")
    private String updateByName;

    /**
     * 关联字段 货架.名称：Shelves.name
     */
    @BindField(entity = Shelves.class, field = "name", condition = "this.shelves_id=id")
    private String shelvesName;

    /**
     * 关联字段 库房.名称：Storeroom.name
     */
    @BindField(entity = Storeroom.class, field = "name", condition = "this.storeroom_id=id")
    private String storeroomName;

    /**
     * 关联对象 订单sku：OrderSku
     */
    @BindEntity(entity = OrderSku.class, condition = "this.order_sku_id=id")
    private OrderSku orderSku;
}
